﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="CreateShould.cs" company="SaltFx">
//   Copyright (c) SaltFx - All rights reserved.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace SaltFx.Data.NHibernate.Tests.DataSessionProvider
{
	using NUnit.Framework;

	using DataSessionProvider = SaltFx.Data.NHibernate.DataSessionProvider;

	/// <summary>
	/// The DataSessionProvider Create method tests.
	/// </summary>
	[TestFixture]
	public class CreateShould
	{
		#region Public Methods and Operators

		/// <summary>
		/// Tests that Create returns a valid session when there is a properly configured session factory.
		/// </summary>
		[Test]
		public void ReturnDataSessionGivenValidSessionFactoryConfiguration()
		{
			// Arrange
			var dataSessionProvider = new DataSessionProvider(new UnitTestSessionFactoryBuilder());

			// Act
			var dataSession = dataSessionProvider.Create();

			// Assert
			Assert.That(dataSession != null);
		}

		#endregion
	}
}